package com.demo.rxjava

abstract class MySingle {
    companion object {
        fun just(): MySingle {
            return MySingleJust()
        }
    }

    fun map(): MySingle {
        return MySingleMap()
    }
}

class MySingleJust : MySingle() {

}

class MySingleMap : MySingle() {

}

fun main() {
    MySingle.just()
            .map().map().map()
}